//
//  Cell.m
//  BDuan
//
//  Created by dllo on 16/1/27.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "Cell.h"
#import "UIImageView+WebCache.h"
@implementation Cell
- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self createSubViews];
    }
    return self;
}
- (void)createSubViews{
    self.logo = [[UIImageView alloc]initWithFrame:CGRectMake(30, 10, 30, 30)];
//    self.logo.backgroundColor = [UIColor redColor];
    [self.contentView addSubview:self.logo];
    self.title = [[UILabel alloc]initWithFrame:CGRectMake(70, 10, 80, 30)];
//    self.title.backgroundColor = [UIColor greenColor];
    [self.contentView addSubview:self.title];
}
- (void)setClassModel:(ALPClassModel *)classModel{
    _classModel = classModel;
    [self.logo sd_setImageWithURL:[NSURL URLWithString:_classModel.coverPath]];
    self.title.text = _classModel.title;
}
@end
